close

Using Javascript in WordPress

UPDATE: WordPress now has custom menus. At the bottom of the article, I explain how to customize your WordPress Theme’s footer using Custom Menus.

Yesterday, I covered the , and gave you some ideas on how to add some impact and navigation to your WordPress footer. Now, let’s look at some examples on how to customize your WordPress Theme footer.

You will need a and the footer PHP file of your WordPress Theme. Make a backup copy, and copies along the way, just in case you want to take a step back from the changes you made.

Begin the customization process of your WordPress Theme Footer by determining what you want to be in the footer of your blog. Here are some ideas:

  • Pages
  • Categories
  • Feed Links
  • Subscription Information (feeds and/or email)
  • Designer Credit(s)
  • Quotes
  • Advertisements
  • Your Blog’s Purpose
  • Links to Recommended Resources
  • Pictures
  • Credit and Thanks
  • A Personal Note
  • Most important or popular articles on your blog
  • Links to tutorials or “must read first” articles
  • Calendar of Upcoming Events
  • Tags List or Tag Cloud

Really, it’s up to your imagination what you can include in your footer. Some of these can be manually created, others may involve use of , code that generates content specifically for WordPress blogs. Others require WordPress Plugins. Let’s skip all the “hidden” code and work only with the basic structure of the footer, as used in the Default WordPress Theme:

<hr /> <div id="footer"> Powered by <a href="; title="WordPress">WordPress</a> <br /><a href="feed:<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a> and <a href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>.

Which basically looks like:

Powered by WordPress Entries (RSS) and Comments (RSS)

Changing the Links

For our first version of a WordPress Theme footer, let’s change the links around with some new text and make those feed links have a little more emphasis.

<hr /> <div id="footer">

<a href="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a> is dedicated to blogging about blogging.

Powered by <a href="title="WordPress">WordPress</a> and designed by <a href="title="Fred Example Web Design">Fred Example Web Design</a>

<a href="feed:<?php bloginfo('rss2_url'); ?>"><img src="alt="RSS Feed Icon" />Blog Posts Feed (RSS)</a> | <a href="feed:<?php bloginfo('comments_rss2_url'); ?>"><img src="alt="RSS Feed Icon" />Blog Comments Feed (RSS)</a>

Why not take things a little further and add some credit to the WordPress Plugins that keep your blog going.

<hr /> <div id="footer">

<a href="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?><?php bloginfo('name'); ?></a> is dedicated to blogging about blogging.

Powered by <a href="title="WordPress">WordPress</a> and designed by <a href="title="Fred Example Web Design">Fred Example Web Design</a>

<a href="feed:<?php bloginfo('rss2_url'); ?>"><img src="alt="RSS Feed Icon" />Blog Posts Feed (RSS)</a> | <a href="feed:<?php bloginfo('comments_rss2_url'); ?>"><img src="alt="RSS Feed Icon" />Blog Comments Feed (RSS)</a>

Special Thanks to the following WordPress Plugins and their authors:<br /> <a href="title="Contact Form">Contact Form ][</a>, <a href="title="Popularity Contest">Alex King's Popularity Contest WordPress Plugin</a>, <a href="title="Google Sitemap">Arne Brachnold's Google Sitemaps Generator</a>, <a href="title="Subscribe to Comments">Subscribe to Comments</a>, and the spam fighting trio: <a href="title="Akismet">Akismet</a>, <a href="title="Bad Behavior">Bad Behavior</a>, and <a href="title="Spam Karma 2 Comment Spam Fighting Tool">Spam Karma</a>.

You can add all kinds of links, text and graphics to your blog’s footer.

Adding Pages and Categories

The two WordPress template tags used for automatically generating Pages and categories are: and . Let’s add them to the above footer code.

<div id="footer">

&a href="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a> is dedicated to blogging about blogging.

<ul class="footerlinks"> <?php wp_list_pages('title_li='); ?> <ul class="footerlinks"> <?php wp_list_categories('title_li='); ?> Powered by <a href="title="WordPress">WordPress</a> and designed by <a href="title="Fred Example Web Design">Fred Example Web Design</a><br /> <a href="feed:<?php bloginfo('rss2_url'); ?>"><img src="alt="RSS Feed Icon" />Blog Posts Feed (RSS)</a> | <a href="feed:<?php bloginfo('comments_rss2_url'); ?>"><img src="alt="RSS Feed Icon" />Blog Comments Feed (RSS)</a>

The usage of 'title_li=' in the two template tags removes the headings for the list of links. If you want to have a heading, such as Categories:, before the list of links, then remove that parameter.

In the WordPress Theme’s stylesheet, add a style for footerlinks to make the links appear in a line rather than a list:

.footerlinks ul {text-transform:uppercase; 

Previous     Next


TAGS


CATEGORIES

.